home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
CRS
/
crs32.d81
/
examples.arc
/
CSET.A
< prev
next >
Wrap
Text File
|
1989-12-01
|
4KB
|
129 lines
; cset.a
;------------------------------------------------------------
; Initialize Character Set to allow for special C characters
;------------------------------------------------------------
index2 = $0026
index1 = $0024
int0e = $170e
dw $0b00
* = $0b00
CharInit lda #$43 ;Access ROM character set (bank 14)
sta $ff00
ldy #<$4800
sty index2
sty index1
lda #>$d800
sta index2+1
lda #>$4800
sta index1+1
Chi00 lda (index2),y ;Copy charset into RAM
sta (index1),y
iny
bne Chi00
inc index2+1
inc index1+1
lda index2+1
cmp #>$e000
bne Chi00
lda #6 ;6 chars to modify
sta temp1
ldx #0
Chi01 lda Cchars,x
inx
sta index2
sta index1
lda Cchars,x
inx
sta index2+1
clc
adc #4
sta index1+1
ldy #0
Chi02 lda Cchars,x
inx
sta (index2),y
eor #$ff
sta (index1),y
iny
cpy #8
bne Chi02
dec temp1
bne Chi01
lda #$42 ;Enable I/O
sta $ff00
lda #<$4800 ;And copy chrset to the VDC
sta index2
lda #>$4800
sta index2+1
lda #1
sta temp2
ldx #$12
lda #$20
jsr VDCpoke
inx
lda #0
jsr VDCpoke
ldy #0
Chi03 lda (index2),y
ldx #$1f
jsr VDCpoke
iny
cpy #8
bne Chi03
lda #0
Chi04 ldx #$1f
jsr VDCpoke
dey
bne Chi04
clc
lda index2
adc #8
sta index2
bcc Chi06
inc index2+1
lda index2+1
cmp #>$5000
bne Chi06
lda temp2
bne Chi05
jmp int0e
Chi05 lda #>$4800
sta index2+1
dec temp2
Chi06 jmp Chi03
VDCpoke stx $d600
VDCp0 bit $d600
bpl VDCp0
sta $d601
rts
;----------------------------------------------
; Data for redefined characters ( {,},|,~ etc)
;----------------------------------------------
Cchars dw $4ad8
db $0c, $18, $18, $30, $18, $18, $0c, $00
dw $4ae8
db $30, $18, $18, $0c, $18, $18, $30, $00
dw $4b78
db $00, $00, $00, $3b, $6e, $00, $00, $00
dw $4b20
db $00, $00, $00, $00, $00, $00, $00, $7e
dw $4af8
db $18, $18, $18, $18, $18, $18, $18, $00
dw $48e0
db $00, $60, $30, $18, $0c, $06, $03, $00
temp1 db 0
temp2 db 0
.end